<?php

class mailActions extends sfActions
{
	public function executeSendActivation()
	{
		$mail = new sfEmail();

		$mail->setCharset('utf-8');
		$mail->setSubject(sfconfig::get('app_activation_subject'));
		$mail->setSender(sfconfig::get('app_activation_sender'));
		$mail->setFrom(sfconfig::get('app_activation_from'));
		$mail->addReplyTo(sfconfig::get('app_activation_from'));
		$to = $this->getRequestParameter('email');
		$mail->addAddresses($to);

		$this->login = $this->getRequestParameter('email');
		$this->mail = $mail;
	}

	public function executeSendTutorContact()
	{
		$mail = new sfEmail();

		$to = $this->getRequestParameter('to');
		$from = $this->getRequestParameter('youremail');
		$subject = $this->getRequestParameter('subject');

		$mail->setCharset('utf-8');
		$mail->setSubject($subject);
		$mail->setFrom($from);
		$mail->addReplyTo($from);

		$mail->addAddresses($to);

		$this->content = $this->getRequestParameter('content');
		$this->yourname = $this->getRequestParameter('yourname');
		$this->mail = $mail;
	}
}